/*  1:   */ package org.jetbrains.rpc;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.AsyncResult;
import com.intellij.util.Function;
import org.jetbrains.annotations.Nullable;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ final class CommandCallbackWithResponse<SUCCESS_RESPONSE, RESULT, TRANSFORMED_RESULT, ERROR_DETAILS>
/*  9:   */   extends CommandCallbackWithResponseBase<SUCCESS_RESPONSE, AsyncResult<TRANSFORMED_RESULT>, RESULT, ERROR_DETAILS>
/* 10:   */ {
/* 11:   */   private final Function<RESULT, TRANSFORMED_RESULT> c;
/* 12:   */   
/* 13:   */   public CommandCallbackWithResponse(String paramString, Function<RESULT, TRANSFORMED_RESULT> paramFunction, @Nullable ErrorConsumer<AsyncResult<TRANSFORMED_RESULT>, ERROR_DETAILS> paramErrorConsumer)
/* 14:   */   {
/* 15:12 */     this(new AsyncResult(), paramString, paramFunction, paramErrorConsumer);
/* 16:   */   }
/* 17:   */   
/* 18:   */   public CommandCallbackWithResponse(AsyncResult<TRANSFORMED_RESULT> paramAsyncResult, String paramString, Function<RESULT, TRANSFORMED_RESULT> paramFunction, @Nullable ErrorConsumer<AsyncResult<TRANSFORMED_RESULT>, ERROR_DETAILS> paramErrorConsumer)
/* 19:   */   {
/* 20:16 */     super(paramAsyncResult, paramString, paramErrorConsumer);
/* 21:   */     
/* 22:18 */     this.c = paramFunction;
/* 23:   */   }
/* 24:   */   
/* 25:   */   protected void onSuccess(RESULT paramRESULT)
/* 26:   */   {
/* 27:   */     try
/* 28:   */     {
/* 29:24 */       ((AsyncResult)this.callback).setDone(this.c.fun(paramRESULT));
/* 30:   */     }
/* 31:   */     catch (Throwable localThrowable)
/* 32:   */     {
/* 33:27 */       MessageManager.LOG.error(localThrowable);
/* 34:   */     }
/* 35:   */   }
/* 36:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.rpc.CommandCallbackWithResponse

 * JD-Core Version:    0.7.0.1

 */